//
//  CLTopic+Oper.m
//  chanlin
//
//  Created by Ryan on 14-12-15.
//  Copyright (c) 2014年 chanlin. All rights reserved.
//

#import "CLTopic+Oper.h"

@implementation CLTopic (Oper)

- (void)proInitwithDictionary:(NSDictionary *)dic{
    self.itemId=[dic sgrFGetStringForKey:@"id"];
    self.title=[dic sgrFGetStringForKey:@"title"];
    self.style=[dic sgrGetIntForKey:@"showtype"];
    self.area=[dic sgrGetStringForKey:@"areaname"];
    self.comment = [dic sgrGetIntForKey:@"comment"];
    if(_isStrNULL(self.area)){
        self.area=@"0";
    }
    self.link=[dic sgrGetIntForKey:@"type"];
    self.sub=[dic sgrGetStringForKey:@"sub"];
    self.thumnail=[dic sgrGetStringForKey:@"titlepic"];
    self.url=[dic sgrGetStringForKey:@"url"];
    self.status=[dic sgrGetStringForKey:@"status"];
    if(self.style==CLList_style_slide){
        NSArray *imgs=[dic sgrGetArrayForKey:@"morepic"];
        self.slider1=[imgs sgrGetStringForIndex:0];
        self.slider2=[imgs sgrGetStringForIndex:1];
        self.slider3=[imgs sgrGetStringForIndex:2];
        self.cHeight=128.f;
    }else if(self.style==CLList_style_topic_img){
        self.cHeight=100.f;
    }else if(self.style==CLList_style_topic_text){
    
    }else{
        self.cHeight=78.f;

    }
}

@end
